<template>
  <div>
    <ul>
        <li v-for="(item,index) in data" :key="index">{{ item.author_name }}</li>
    </ul>
  </div>
</template>
<script>
export default {
    name:'Hellowrold',
    data () {
        return {
            data:[]
        }
    },
    mounted () {
        
    },
    methods:{
        getAlldata(){
           let that =this;
           this.$http.get('/user.json').then((res)=>{
               that.data=res.data.data;
           }).catch((err)=>{
               console.log("连接错误"+err);
           })
        }
    }
}
</script>
<style>
</style>